<HTML><HEAD><TITLE>make_local_array(++Array)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Obsolete</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>make_local_array(++Array)</H1>
Creates an array or global variable Array visible only in the caller
module.


<DL>
<DT><EM>Array</EM></DT>
<DD>Atom or Ground compound term with integer arguments.
</DD>
</DL>
<H3>This built-in predicate is obsolete!</H3>
<H2>Description</H2>
   If Array is an atom, a global variable only visible from the caller
   module is created.  Its value is initialised to a free variable.

<P>
   If Array is a compound term, a local array of type prolog is created,
   its dimension is the arity of the term Array and the size of each
   dimension is specified by the corresponding argument of the term Array.
   The elements of arrays of type prolog are initialised to free variables.

<P>
Note
   make_local_array(A) is equivalent to make_local_array(A, prolog).

<P>

<H3>Modes and Determinism</H3><UL>
<LI>make_local_array(++) is det
</UL>
<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>Array is not ground.
<DT><EM>(5) type error </EM>
<DD>Array is not an atom or a structure with integer arguments.
<DT><EM>(6) out of range </EM>
<DD>The ground structure Array has arguments that are integers    not greater than 0.
<DT><EM>(42) redefining an existing array </EM>
<DD>A local array with the same name and dimension as Array    already exists.
</DL>
<H2>Examples</H2>
<PRE>
Success:
      make_local_array(a).
      make_local_array(a(1)).
      make_local_array(a(4)).
      make_local_array(b(2,3)).
      make_local_array(a(4)), make_local_array(a(4,1)).
      make_local_array(a), make_local_array(a(1)).

Error:
      make_local_array(X).              (Error 4).
      make_local_array(a(6.0)).         (Error 5).
      make_local_array(a(0)).           (Error 6).
      make_local_array(a(-2)).          (Error 6).
      make_local_array(a(4)),
          make_local_array(a(5)).       (Error 42).


</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/storage/array-1.html">array / 1</A>, <A HREF="../../kernel/storage/current_array-2.html">current_array / 2</A>, <A HREF="../../kernel/storage/decval-1.html">decval / 1</A>, <A HREF="../../kernel/storage/incval-1.html">incval / 1</A>, <A HREF="../../kernel/obsolete/make_array-1.html">make_array / 1</A>, <A HREF="../../kernel/obsolete/make_array-2.html">make_array / 2</A>, <A HREF="../../kernel/obsolete/make_local_array-2.html">make_local_array / 2</A>, <A HREF="../../kernel/storage/getval-2.html">getval / 2</A>, <A HREF="../../kernel/storage/setval-2.html">setval / 2</A>
</BODY></HTML>
